/*
* Creating date: 18-Oct-2014
* Last modifying date:
* Author: Nguyen Trong Viet
*/

/*
 * Description: This file contains the API to control SSD1289 chip by FSMC interface
 * Please find the detail in attached document
 */

#ifndef LCD_ASCII_H
#define LCD_ASCII_H


#ifdef __cplusplus
    extern "C" {
#endif

#include "stm32f4xx.h"
#include "stm32f4xx_Types.h"
#include "f4xx_LCD_Middle.h"
#include "Delay.h"
#include "Common_funcs.h"
#include "common_para.h"

#define Letter_A	((UIN64) 0x5c7242447840623cu)
#define Letter_B	((UIN64) 0x3E4646463A020202u)

#define Num_0		((UIN64) 0x3C4242424242423Cu)
#define Num_1		((UIN64) 0x7C383838383C3C38u)
#define Num_2		((UIN64) 0x7E460C183062663Cu)
#define Num_3		((UIN64) 0x3E2220383820223Eu) /* distance 5 */
#define Num_4		((UIN64) 0x2020FF2323262C38u)
#define Num_5		((UIN64) 0x3E6240603E02027Eu)
#define Num_6		((UIN64) 0x3C6642663E02463Cu)
#define Num_7		((UIN64) 0x0C0C0C183060627Eu)
#define Num_8		((UIN64) 0x3C4242423C42423Cu)
#define Num_9		((UIN64) 0x3C4240407C42423Cu)

#define Alphabet_LowerCase a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z

#define Alphabet_UpperCase A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z

#define Numbers_LCD	Nu_0,Nu_1,Nu_2,Nu_3,Nu_4,Nu_5,Nu_6,Nu_7,Nu_8,Nu_9

enum AsciiList
{
	Alphabet_LowerCase,
	Alphabet_UpperCase,
	Numbers_LCD
};


struct LCD_Letter_64
{
	UIN16 X_Add;
	UIN16 Y_Add;
	UIN16 Height;
	UIN16 Width;
	enum AsciiList LetterID;
	UIN16 Colour;
	UIN8 Scale;
};

void LCD_PrintLetter(struct LCD_Letter_64 * Letter);
void LCD_PrintNum16(UIN16 * P_NUM, UIN16 X_Cor, UIN16 Y_Cor);


#ifdef __cplusplus
    }
#endif
#endif
